package com.hnnou.freshmenappserver.dao;

import com.hnnou.freshmenappserver.bean.Function;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface FunctionDao {
    @Select("select * from t_function")
    List<Function> findAll();
    @Delete("delete from t_function where id=#{id}")
    int deleteById(int id);
    @Update("update t_function set  functionname=#{functionname} ,icon=#{icon}  " +
            " where id=#{id} ")
    int update(Function function);
    @Insert("insert into t_function(functionname, icon)"+
            " values(#{functionname},#{icon})")
    int insert(Function function);

    @Select("select * from t_function where id=#{id}")
    Function selectById(int id);


}
